package com.pzb.wechat.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pzb.wechat.mapper.WechatUserAccountMapper;
import com.pzb.wechat.domain.WechatUserAccount;
import com.pzb.wechat.service.IWechatUserAccountService;

/**
 * 用户账户Service业务层处理
 * 
 * @author Mr_Wu
 * @date 2022-01-23
 */
@Service
public class WechatUserAccountServiceImpl implements IWechatUserAccountService 
{
    @Autowired
    private WechatUserAccountMapper wechatUserAccountMapper;

    /**
     * 查询用户账户
     * 
     * @param
     * @return 用户账户
     */
    @Override
    public WechatUserAccount selectWechatUserAccountByOpenId(String openid, String extAppid) {
        return wechatUserAccountMapper.selectWechatUserAccountByOpenId(openid,extAppid);
    }

    /**
     * 新增用户账户
     * 
     * @param wechatUserAccount 用户账户
     * @return 结果
     */
    @Override
    public int insertWechatUserAccount(WechatUserAccount wechatUserAccount)
    {
        return wechatUserAccountMapper.insertWechatUserAccount(wechatUserAccount);
    }

    /**
     * 修改用户账户
     * 
     * @param wechatUserAccount 用户账户
     * @return 结果
     */
    @Override
    public int updateWechatUserAccount(WechatUserAccount wechatUserAccount)
    {
        return wechatUserAccountMapper.updateWechatUserAccount(wechatUserAccount);
    }

}
